import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './utils/vant'
import '@/styles/base.less'
import 'amfe-flexible'

import dayjs from 'dayjs'
import relativeTime from 'dayjs/plugin/relativeTime'
import 'dayjs/locale/zh-cn'
dayjs.extend(relativeTime)
dayjs.locale('zh-cn')

Vue.config.productionTip = false

// 封装一个方法并挂载到Vue的原型上
Vue.prototype.$relvTime = (time) => {
  return dayjs(time).fromNow()
}

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
